3.113 \(\int \frac{x^5 (A+B x^2)}{(a+b x^2+c x^4)^2} \, dx\)

Optimal. Leaf size=147 \[ \frac{\left (4 a A c^2-6 a b B c+b^3 B\right ) \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{2 c^2 \left (b^2-4 a c\right )^{3/2}}-\frac{x^2 \left (x^2 \left (-2 a B c-A b c+b^2 B\right )+a (b B-2 A c)\right )}{2 c \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{B \log \left (a+b x^2+c x^4\right )}{4 c^2} \]

[Out]

-(x^2*(a*(b*B - 2*A*c) + (b^2*B - A*b*c - 2*a*B*c)*x^2))/(2*c*(b^2 - 4*a*c)*(a + b*x^2 + c*x^4)) + ((b^3*B - 6
*a*b*B*c + 4*a*A*c^2)*ArcTanh[(b + 2*c*x^2)/Sqrt[b^2 - 4*a*c]])/(2*c^2*(b^2 - 4*a*c)^(3/2)) + (B*Log[a + b*x^2
 + c*x^4])/(4*c^2)

________________________________________________________________________________________

Rubi [A]  time = 0.174667, antiderivative size = 147, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.24, Rules used = {1251, 818, 634, 618, 206, 628} \[ \frac{\left (4 a A c^2-6 a b B c+b^3 B\right ) \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{2 c^2 \left (b^2-4 a c\right )^{3/2}}-\frac{x^2 \left (x^2 \left (-2 a B c-A b c+b^2 B\right )+a (b B-2 A c)\right )}{2 c \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{B \log \left (a+b x^2+c x^4\right )}{4 c^2} \]

Antiderivative was successfully verified.

[In]

Int[(x^5*(A + B*x^2))/(a + b*x^2 + c*x^4)^2,x]

[Out]

-(x^2*(a*(b*B - 2*A*c) + (b^2*B - A*b*c - 2*a*B*c)*x^2))/(2*c*(b^2 - 4*a*c)*(a + b*x^2 + c*x^4)) + ((b^3*B - 6
*a*b*B*c + 4*a*A*c^2)*ArcTanh[(b + 2*c*x^2)/Sqrt[b^2 - 4*a*c]])/(2*c^2*(b^2 - 4*a*c)^(3/2)) + (B*Log[a + b*x^2
 + c*x^4])/(4*c^2)

Rule 1251

Int[(x_)^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Dist[1/2,
Subst[Int[x^((m - 1)/2)*(d + e*x)^q*(a + b*x + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, b, c, d, e, p, q}, x] &&
 IntegerQ[(m - 1)/2]

Rule 818

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> -Si
mp[((d + e*x)^(m - 1)*(a + b*x + c*x^2)^(p + 1)*(2*a*c*(e*f + d*g) - b*(c*d*f + a*e*g) - (2*c^2*d*f + b^2*e*g
- c*(b*e*f + b*d*g + 2*a*e*g))*x))/(c*(p + 1)*(b^2 - 4*a*c)), x] - Dist[1/(c*(p + 1)*(b^2 - 4*a*c)), Int[(d +
e*x)^(m - 2)*(a + b*x + c*x^2)^(p + 1)*Simp[2*c^2*d^2*f*(2*p + 3) + b*e*g*(a*e*(m - 1) + b*d*(p + 2)) - c*(2*a
*e*(e*f*(m - 1) + d*g*m) + b*d*(d*g*(2*p + 3) - e*f*(m - 2*p - 4))) + e*(b^2*e*g*(m + p + 1) + 2*c^2*d*f*(m +
2*p + 2) - c*(2*a*e*g*m + b*(e*f + d*g)*(m + 2*p + 2)))*x, x], x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && Ne
Q[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && LtQ[p, -1] && GtQ[m, 1] && ((EqQ[m, 2] && EqQ[p, -3] &&
RationalQ[a, b, c, d, e, f, g]) ||  !ILtQ[m + 2*p + 3, 0])

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps

\begin{align*} \int \frac{x^5 \left (A+B x^2\right )}{\left (a+b x^2+c x^4\right )^2} \, dx &=\frac{1}{2} \operatorname{Subst}\left (\int \frac{x^2 (A+B x)}{\left (a+b x+c x^2\right )^2} \, dx,x,x^2\right )\\ &=-\frac{x^2 \left (a (b B-2 A c)+\left (b^2 B-A b c-2 a B c\right ) x^2\right )}{2 c \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{\operatorname{Subst}\left (\int \frac{a (b B-2 A c)+B \left (b^2-4 a c\right ) x}{a+b x+c x^2} \, dx,x,x^2\right )}{2 c \left (b^2-4 a c\right )}\\ &=-\frac{x^2 \left (a (b B-2 A c)+\left (b^2 B-A b c-2 a B c\right ) x^2\right )}{2 c \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{B \operatorname{Subst}\left (\int \frac{b+2 c x}{a+b x+c x^2} \, dx,x,x^2\right )}{4 c^2}-\frac{\left (b^3 B-6 a b B c+4 a A c^2\right ) \operatorname{Subst}\left (\int \frac{1}{a+b x+c x^2} \, dx,x,x^2\right )}{4 c^2 \left (b^2-4 a c\right )}\\ &=-\frac{x^2 \left (a (b B-2 A c)+\left (b^2 B-A b c-2 a B c\right ) x^2\right )}{2 c \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{B \log \left (a+b x^2+c x^4\right )}{4 c^2}+\frac{\left (b^3 B-6 a b B c+4 a A c^2\right ) \operatorname{Subst}\left (\int \frac{1}{b^2-4 a c-x^2} \, dx,x,b+2 c x^2\right )}{2 c^2 \left (b^2-4 a c\right )}\\ &=-\frac{x^2 \left (a (b B-2 A c)+\left (b^2 B-A b c-2 a B c\right ) x^2\right )}{2 c \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{\left (b^3 B-6 a b B c+4 a A c^2\right ) \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{2 c^2 \left (b^2-4 a c\right )^{3/2}}+\frac{B \log \left (a+b x^2+c x^4\right )}{4 c^2}\\ \end{align*}

Mathematica [A]  time = 0.205738, size = 160, normalized size = 1.09 \[ \frac{-\frac{2 \left (2 a^2 B c+a \left (b c \left (A+3 B x^2\right )-2 A c^2 x^2+b^2 (-B)\right )+b^2 x^2 (A c-b B)\right )}{\left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{2 \left (4 a A c^2-6 a b B c+b^3 B\right ) \tan ^{-1}\left (\frac{b+2 c x^2}{\sqrt{4 a c-b^2}}\right )}{\left (4 a c-b^2\right )^{3/2}}+B \log \left (a+b x^2+c x^4\right )}{4 c^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(x^5*(A + B*x^2))/(a + b*x^2 + c*x^4)^2,x]

[Out]

((-2*(2*a^2*B*c + b^2*(-(b*B) + A*c)*x^2 + a*(-(b^2*B) - 2*A*c^2*x^2 + b*c*(A + 3*B*x^2))))/((b^2 - 4*a*c)*(a
+ b*x^2 + c*x^4)) + (2*(b^3*B - 6*a*b*B*c + 4*a*A*c^2)*ArcTan[(b + 2*c*x^2)/Sqrt[-b^2 + 4*a*c]])/(-b^2 + 4*a*c
)^(3/2) + B*Log[a + b*x^2 + c*x^4])/(4*c^2)

________________________________________________________________________________________

Maple [B]  time = 0.013, size = 286, normalized size = 2. \begin{align*}{\frac{1}{2\,c{x}^{4}+2\,b{x}^{2}+2\,a} \left ( -{\frac{ \left ( 2\,aA{c}^{2}-A{b}^{2}c-3\,abBc+{b}^{3}B \right ){x}^{2}}{{c}^{2} \left ( 4\,ac-{b}^{2} \right ) }}+{\frac{a \left ( Abc+2\,aBc-{b}^{2}B \right ) }{{c}^{2} \left ( 4\,ac-{b}^{2} \right ) }} \right ) }+{\frac{\ln \left ( c{x}^{4}+b{x}^{2}+a \right ) aB}{ \left ( 4\,ac-{b}^{2} \right ) c}}-{\frac{\ln \left ( c{x}^{4}+b{x}^{2}+a \right ){b}^{2}B}{ \left ( 16\,ac-4\,{b}^{2} \right ){c}^{2}}}+2\,{\frac{aA}{ \left ( 4\,ac-{b}^{2} \right ) ^{3/2}}\arctan \left ({\frac{2\,c{x}^{2}+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) }-3\,{\frac{abB}{ \left ( 4\,ac-{b}^{2} \right ) ^{3/2}c}\arctan \left ({\frac{2\,c{x}^{2}+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) }+{\frac{{b}^{3}B}{2\,{c}^{2}}\arctan \left ({(2\,c{x}^{2}+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ) \left ( 4\,ac-{b}^{2} \right ) ^{-{\frac{3}{2}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^5*(B*x^2+A)/(c*x^4+b*x^2+a)^2,x)

[Out]

1/2*(-1/c^2*(2*A*a*c^2-A*b^2*c-3*B*a*b*c+B*b^3)/(4*a*c-b^2)*x^2+a*(A*b*c+2*B*a*c-B*b^2)/c^2/(4*a*c-b^2))/(c*x^
4+b*x^2+a)+1/(4*a*c-b^2)/c*ln(c*x^4+b*x^2+a)*a*B-1/4/(4*a*c-b^2)/c^2*ln(c*x^4+b*x^2+a)*b^2*B+2/(4*a*c-b^2)^(3/
2)*arctan((2*c*x^2+b)/(4*a*c-b^2)^(1/2))*a*A-3/(4*a*c-b^2)^(3/2)/c*arctan((2*c*x^2+b)/(4*a*c-b^2)^(1/2))*a*b*B
+1/2/(4*a*c-b^2)^(3/2)/c^2*arctan((2*c*x^2+b)/(4*a*c-b^2)^(1/2))*b^3*B

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^5*(B*x^2+A)/(c*x^4+b*x^2+a)^2,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 1.8405, size = 1804, normalized size = 12.27 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^5*(B*x^2+A)/(c*x^4+b*x^2+a)^2,x, algorithm="fricas")

[Out]

[1/4*(2*B*a*b^4 + 8*(2*B*a^3 + A*a^2*b)*c^2 + 2*(B*b^5 - 8*A*a^2*c^3 + 6*(2*B*a^2*b + A*a*b^2)*c^2 - (7*B*a*b^
3 + A*b^4)*c)*x^2 - (B*a*b^3 - 6*B*a^2*b*c + 4*A*a^2*c^2 + (B*b^3*c - 6*B*a*b*c^2 + 4*A*a*c^3)*x^4 + (B*b^4 -
6*B*a*b^2*c + 4*A*a*b*c^2)*x^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)]

________________________________________________________________________________________

Sympy [B]  time = 18.004, size = 916, normalized size = 6.23 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**5*(B*x**2+A)/(c*x**4+b*x**2+a)**2,x)

[Out]

(B/(4*c**2) - sqrt(-(4*a*c - b**2)**3)*(-4*A*a*c**2 + 6*B*a*b*c - B*b**3)/(4*c**2*(64*a**3*c**3 - 48*a**2*b**2
*c**2 + 12*a*b**4*c - b**6)))*log(x**2 + (-2*A*a*b*c + 8*B*a**2*c - B*a*b**2 - 32*a**2*c**3*(B/(4*c**2) - sqrt
(-(4*a*c - b**2)**3)*(-4*A*a*c**2 + 6*B*a*b*c - B*b**3)/(4*c**2*(64*a**3*c**3 - 48*a**2*b**2*c**2 + 12*a*b**4*
c - b**6))) + 16*a*b**2*c**2*(B/(4*c**2) - sqrt(-(4*a*c - b**2)**3)*(-4*A*a*c**2 + 6*B*a*b*c - B*b**3)/(4*c**2
*(64*a**3*c**3 - 48*a**2*b**2*c**2 + 12*a*b**4*c - b**6))) - 2*b**4*c*(B/(4*c**2) - sqrt(-(4*a*c - b**2)**3)*(
-4*A*a*c**2 + 6*B*a*b*c - B*b**3)/(4*c**2*(64*a**3*c**3 - 48*a**2*b**2*c**2 + 12*a*b**4*c - b**6))))/(-4*A*a*c
**2 + 6*B*a*b*c - B*b**3)) + (B/(4*c**2) + sqrt(-(4*a*c - b**2)**3)*(-4*A*a*c**2 + 6*B*a*b*c - B*b**3)/(4*c**2
*(64*a**3*c**3 - 48*a**2*b**2*c**2 + 12*a*b**4*c - b**6)))*log(x**2 + (-2*A*a*b*c + 8*B*a**2*c - B*a*b**2 - 32
*a**2*c**3*(B/(4*c**2) + sqrt(-(4*a*c - b**2)**3)*(-4*A*a*c**2 + 6*B*a*b*c - B*b**3)/(4*c**2*(64*a**3*c**3 - 4
8*a**2*b**2*c**2 + 12*a*b**4*c - b**6))) + 16*a*b**2*c**2*(B/(4*c**2) + sqrt(-(4*a*c - b**2)**3)*(-4*A*a*c**2
+ 6*B*a*b*c - B*b**3)/(4*c**2*(64*a**3*c**3 - 48*a**2*b**2*c**2 + 12*a*b**4*c - b**6))) - 2*b**4*c*(B/(4*c**2)
 + sqrt(-(4*a*c - b**2)**3)*(-4*A*a*c**2 + 6*B*a*b*c - B*b**3)/(4*c**2*(64*a**3*c**3 - 48*a**2*b**2*c**2 + 12*
a*b**4*c - b**6))))/(-4*A*a*c**2 + 6*B*a*b*c - B*b**3)) + (A*a*b*c + 2*B*a**2*c - B*a*b**2 + x**2*(-2*A*a*c**2
 + A*b**2*c + 3*B*a*b*c - B*b**3))/(8*a**2*c**3 - 2*a*b**2*c**2 + x**4*(8*a*c**4 - 2*b**2*c**3) + x**2*(8*a*b*
c**3 - 2*b**3*c**2))

________________________________________________________________________________________

Giac [A]  time = 19.9281, size = 262, normalized size = 1.78 \begin{align*} -\frac{{\left (B b^{3} - 6 \, B a b c + 4 \, A a c^{2}\right )} \arctan \left (\frac{2 \, c x^{2} + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{2 \,{\left (b^{2} c^{2} - 4 \, a c^{3}\right )} \sqrt{-b^{2} + 4 \, a c}} + \frac{B \log \left (c x^{4} + b x^{2} + a\right )}{4 \, c^{2}} - \frac{B b^{2} c x^{4} - 4 \, B a c^{2} x^{4} - B b^{3} x^{2} + 2 \, B a b c x^{2} + 2 \, A b^{2} c x^{2} - 4 \, A a c^{2} x^{2} - B a b^{2} + 2 \, A a b c}{4 \,{\left (c x^{4} + b x^{2} + a\right )}{\left (b^{2} c^{2} - 4 \, a c^{3}\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^5*(B*x^2+A)/(c*x^4+b*x^2+a)^2,x, algorithm="giac")

[Out]

-1/2*(B*b^3 - 6*B*a*b*c + 4*A*a*c^2)*arctan((2*c*x^2 + b)/sqrt(-b^2 + 4*a*c))/((b^2*c^2 - 4*a*c^3)*sqrt(-b^2 +
 4*a*c)) + 1/4*B*log(c*x^4 + b*x^2 + a)/c^2 - 1/4*(B*b^2*c*x^4 - 4*B*a*c^2*x^4 - B*b^3*x^2 + 2*B*a*b*c*x^2 + 2
*A*b^2*c*x^2 - 4*A*a*c^2*x^2 - B*a*b^2 + 2*A*a*b*c)/((c*x^4 + b*x^2 + a)*(b^2*c^2 - 4*a*c^3))